#include <iostream>
#include "vectorfunctions.h"

int insertzero(float x[], int l)
{
	int i, j, nl=l;
	for(i=1;i<l;i++)
		if (x[i]!=0)
			if (x[i-1]!=0 && x[i+1]!=0){
				for (j=l;j>i;--j)
					x[j]=x[j-1];				
				x[i]=0;
				++l;	
			}
return l;			
}

int main()
{
	int l, nl;
	float x[100];
	cout<<"Number of elements : ";
	cin>>l;
	readVector(x, l);
	printVector(x, l);
	nl = insertzero(x, l);
	printVector(x, nl);
return 0;
}
